


var TodoList=(state=[],action)=>{
	switch (action.type){
		case 'ADD_TODO':
			let newstate=[...state];
			newstate.push(action.text);
			return newstate;
		case 'RM_TODO':
			let newstates=[...state];
			newstates.splice(action.text,1);
			return newstates;
		default:
			return state;
	}
}

export default TodoList;